<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
function Arry(arr) {
	var arrys = {
		max: Math.max.apply(Array, arr),
		min: Math.min.apply(Array, arr)
	};
	return arrys;
}
console.log(Arry([25,62,91,78,34,62]))

// Math.max.apply(null, array);
console.log(Math.max.apply(null, [25,62,91,78,34,62]));

// array.sort((a, b) => a - b);
// const max = array[array.length - 1],
//       min = array[0]


//       Math.max(...array);
// Math.min(...array);

// arr.reduce((prev, cur) => Math.max(prev, cur));
// arr.reduce((prev, cur) => prev = prev > cur ? prev : cur)
  </script>

</body>

</html>